#ifndef COMPETITIONMANAGER_H
#define COMPETITIONMANAGER_H

#include <QDialog>
#include "systemcontroller.h"
#include "competition/competitionmodel.h"
#include "competition/distancemodel.h"

namespace Ui {
class CompetitionManager;
}

class CompetitionManager : public QDialog
{
    Q_OBJECT
    
public:
    explicit CompetitionManager(SystemController *systemController, QWidget *parent = 0);
    ~CompetitionManager();
    
private:
    Ui::CompetitionManager *ui;
    SystemController *systemController;
    CompetitionModel *completedCompetitionModel;
    DistanceModel *distanceModel;

    int beforeSelectedRowDistance;

    void fillComboBox();

private slots:
    void refreshView();
    void refreshDistanceView();
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();
    void showRightClickMenuCompletedCompetitions(const QPoint &pos);
    void on_pushButton_4_clicked();
};

#endif // COMPETITIONMANAGER_H
